package com.ikingtech.platform.service.system.role.configuration;

import com.ikingtech.framework.sdk.component.api.CompRoleApi;
import com.ikingtech.platform.service.system.role.service.CompRoleService;
import com.ikingtech.platform.service.system.role.service.RoleRepository;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author tie yan
 */
@Configuration
public class CompRoleConfiguration {

    @Bean
    @ConditionalOnMissingBean({CompRoleApi.class})
    public CompRoleApi compRoleApi(RoleRepository service) {
        return new CompRoleService(service);
    }
}
